/*
 * CommandLineParser.h
 *
 *  Created on:  May 29, 2009
 *      Author:  Zach Riggle A37627537
 *      Project: CSE410 Project 1
 */

#ifndef COMMANDLINEPARSER_H_
#define COMMANDLINEPARSER_H_

#include <iostream>
#include <string>

using namespace std;

/**
 * Responsible for parsing the command-line arguments as passed to
 * the main executable (i.e. '-c cmd arg arg arg') and returning
 * the pertinent information (i.e. 'cmd arg arg arg') as a string.
 */
class CommandLineParser {
public:
    const static string commandString;

    CommandLineParser(int argc, char** argv);
    virtual ~CommandLineParser();

    /**
     * @return True if the user specified threaded mode.
     */
    bool isThreaded();

    /**
     * @return True if the user specified multi-process mode.
     */
    bool isParallel();

    /**
     * @return True if the command-line options were valid.
     */
    bool isValid();

    /**
     * @return The input file path.
     */
    string getInputFile();

    /**
     * @return The output file path.
     */
    string getOutputFile();
private:

    bool valid;
    bool doParallel;
    bool doThreaded;
    string inputFile;
    string outputFile;

    const static int inputOffset;
    const static int outputOffset;
    const static int optionOffset;
    const static string parallel;
    const static string threaded;
};

#endif /* COMMANDLINEPARSER_H_ */
